var item1 = {
    color: '#F54F4A'
};
var item2 = {
    color: '#FF8C75'
};
var item3 = {
    color: '#FFB499'
};

var item4 = {
    color: '#CCCCCC'
};

var data = [{
    name: '核心数据结构',
    itemStyle: item1,
    children: [{
        name: "string",

        itemStyle: item2,
        children: [
            {
                name: "SET",
                value: 1,
                itemStyle: item3
            }, {
                name: "GET",
                value: 1,
                itemStyle: item3
            }, {
                name: "MSET",
                value: 1,
                itemStyle: item3
            }, {
                name: "MSET",
                value: 1,
                itemStyle: item3
            }, {
                name: " Setnx（SET if Not eXists）",
                value: 1,
                itemStyle: item3
            }
        ]
    }, {
        name: "hash",
        itemStyle: item2,
        children: [
            {
                name: "HSET",
                value: 1,
                itemStyle: item3
            }, {
                name: "HSETNX",
                value: 1,
                itemStyle: item3
            }, {
                name: "HINCRBY",
                value: 1,
                itemStyle: item4
            }, {
                name: "HLEN",
                value: 1,
                itemStyle: item3
            }, {
                name: "HGetAll",
                value: 1,
                itemStyle: item3
            }, {
                name: "运用场景",


                itemStyle: item2,
                children: [
                    {
                        name: "电商购物车",
                        value: 1,
                        itemStyle: item3
                    }
                ]
            }

        ]
    }, {
        name: "list",
        itemStyle: item2,
        children: [
            {
                name: "运用场景",

                itemStyle: item2,
                children: [{
                    name: "消息订阅",
                    value: 1,
                    itemStyle: item3
                }]

            }
            , {
                name: "Lpush",

                itemStyle: item3,
                value: 1,

            }, {
                name: "Rpush",

                itemStyle: item3,
                value: 1,

            }, {
                name: "lrange",

                itemStyle: item3,
                value: 1,

            }]

    }, {
        name: "set",

        itemStyle: item2,
        children: [
            {
                name: "运用场景",

                itemStyle: item2,
                children: [{
                    name: "抽奖",
                    itemStyle: item3,
                    children: [
                        {
                            name: "SRANDMEMBER key count",

                            itemStyle: item4,
                            value: 1
                        }, {
                            name: "Spop key count",

                            itemStyle: item4,
                            value: 1
                        }
                    ]
                }, {
                    name: "点赞",
                    itemStyle: item3,
                    children: [
                        {
                            name: "sismember",
                            itemStyle: item4,
                            value: 1
                        }, {
                            name: "Scard",
                            itemStyle: item4,
                            value: 1
                        }, {
                            name: "Srem",
                            itemStyle: item4,
                            value: 1
                        }]
                }, {
                    name: "推荐",
                    itemStyle: item3,
                    children:[
                        {name:"Sinter",

                            itemStyle:item4,
                            value:1
                        },{name:"Sunion",

                            itemStyle:item4,
                            value:1
                        },{name:"Sdiff",

                            itemStyle:item4,
                            value:1
                        }
                    ]
                }
                ]

            }, {
                name: "Smembers",
                itemStyle: item3,
                value: 1
            }, {
                name: "Sadd",
                itemStyle: item3,
                value: 1
            }
        ]

    },{name:"Zset",

        itemStyle:item3,
        children:
            [{
                name:"运用场景",
                itemStyle:item2,
                children:[
                    {
                        name:"投票",
                        itemStyle:item3,
                        value:1
                    }]
            },
                {
                    name:"zadd",
                    itemStyle:item3,
                    value:1
                },
                {
                    name:"zrange",
                    itemStyle:item3,
                    value:1
                },
                {
                    name:"zrangebyscore",
                    itemStyle:item3,
                    value:1
                }
            ]
    }

    ]

},
    {
        name: "安全",
        itemStyle: item1,

        children: [{
            name: "分布式锁",
            value: 1,
            itemStyle: item2
        },
            {
                name: "持久化",
                value: 1,
                itemStyle: item2
            },{
                name: "事务",
                value: 1,
                itemStyle: item2
            }]
    },
    {
        name: "并发",
        itemStyle: item1,
        children: [{
            name: "模拟高并发",
            value: 1,
            itemStyle: item2
        }]

    },
    {
        name: "集群",
        itemStyle: item1,
        value: 1,

    }
];

option = {
    series: {
        radius: ['15%', '90%'],
        type: 'sunburst',
        sort: null,
        highlightPolicy: 'ancestor',
        data: data,
        label: {
            rotate: 'radial'
        },
        levels: [],
        itemStyle: {
            color: '#ddd',
            borderWidth: 2
        }
    }
};
